import service from '@/utils/request'

export const useGoodApi = (id: Number) => {
	return service.get('/sys/good/' + id)
}

export const useGoodSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/sys/good', dataForm)
	} else {
		return service.post('/sys/good/save', dataForm)
	}
}

export const useGoodListApi = (dataForm: any) => {
	return service.post('/sys/good/list', dataForm)
}
export const getUseHouseDetailApi = (dataForm: any) => {
	return service.post('/sys/housedetail/list', dataForm)
}
export const getUseHouseDetailListApi = (dataForm: any) => {
	return service.post('/sys/housedetaillist/list', dataForm)
}
export const useHouseApi = (dataForm: any) => {
	return service.post('/sys/house/save', dataForm)
}
export const useHouseDetailApi = (dataForm: any) => {
	return service.post('/sys/housedetail/save', dataForm)
}
export const useHouseListApi = (dataForm: any) => {
	return service.post('/sys/houselist/save', dataForm)
}
export const useHouseDetailListApi = (dataForm: any) => {
	return service.post('/sys/housedetaillist/save', dataForm)
}
